package com.chen.solution.validator.demo.dto;

import com.chen.solution.validator.demo.validation.PhoneNumber;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.Instant;

/**
 * @author Chentian
 * @date 2022/3/17
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AccountDto {

    private String id;

    @NotBlank
    private String name;

    @Email(message = "Invalid email")
    private String email;

    @PhoneNumber
    private String phoneNumber;

    @NotEmpty
    private String photoUrl;

}
